package com.wisely.highlight_spring4.ch1.di;

import java.util.Date;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;

@SuppressWarnings("deprecation")
public class BeanFactoryTest
{
	public static void main(String[] args)
	{
//		BeanFactory bf = new XmlBeanFactory(new ClassPathResource("ApplicationContext.xml"));
		ApplicationContext bf = new ClassPathXmlApplicationContext("ApplicationContext.xml");
		UseFunctionService useFunc = (UseFunctionService) bf.getBean("useFunctionService");
		Date date = useFunc.getDate();
		System.out.println(date);
	}
}
